package base;

import java.util.Scanner;

public class BASIC3 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		for (int i = 0; i < n; i++) {
			String str = generateStr(i, true) + generateStr(m - i, false);
			System.out.println(str);
		}
		sc.close();
	}

	public static String generateStr(int n, boolean reverse) {
		if (n == 0) {
			return "";
		}
		StringBuilder sb = new StringBuilder();
		int begin = 0;
		int end = n;
		if (reverse) {
			begin = 1;
			end = end + 1;
		}
		for (int i = begin; i < end; i++) {
			sb.append((char) ('A' + i));
		}
		if (reverse) {
			return sb.reverse().toString();
		}
		return sb.toString();
	}
}
